home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / xulapp / nsIToolkitProfileService.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  11KB  |  249 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIToolkitProfileService.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIToolkitProfileService_h__
  6. #define __gen_nsIToolkitProfileService_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17. class nsISimpleEnumerator; /* forward declaration */
  18.  
  19. class nsILocalFile; /* forward declaration */
  20.  
  21. class nsIToolkitProfile; /* forward declaration */
  22.  
  23. class nsIProfileLock; /* forward declaration */
  24.  
  25.  
  26. /* starting interface:    nsIToolkitProfileService */
  27. #define NS_ITOOLKITPROFILESERVICE_IID_STR "9b434f48-438c-4f85-89de-b7f321a45341"
  28.  
  29. #define NS_ITOOLKITPROFILESERVICE_IID \
  30.   {0x9b434f48, 0x438c, 0x4f85, \
  31.     { 0x89, 0xde, 0xb7, 0xf3, 0x21, 0xa4, 0x53, 0x41 }}
  32.  
  33. class NS_NO_VTABLE nsIToolkitProfileService : public nsISupports {
  34.  public: 
  35.  
  36.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_ITOOLKITPROFILESERVICE_IID)
  37.  
  38.   /* attribute boolean startWithLastProfile; */
  39.   NS_IMETHOD GetStartWithLastProfile(PRBool *aStartWithLastProfile) = 0;
  40.   NS_IMETHOD SetStartWithLastProfile(PRBool aStartWithLastProfile) = 0;
  41.  
  42.   /* attribute boolean startOffline; */
  43.   NS_IMETHOD GetStartOffline(PRBool *aStartOffline) = 0;
  44.   NS_IMETHOD SetStartOffline(PRBool aStartOffline) = 0;
  45.  
  46.   /* readonly attribute nsISimpleEnumerator profiles; */
  47.   NS_IMETHOD GetProfiles(nsISimpleEnumerator * *aProfiles) = 0;
  48.  
  49.   /* attribute nsIToolkitProfile selectedProfile; */
  50.   NS_IMETHOD GetSelectedProfile(nsIToolkitProfile * *aSelectedProfile) = 0;
  51.   NS_IMETHOD SetSelectedProfile(nsIToolkitProfile * aSelectedProfile) = 0;
  52.  
  53.   /**
  54.      * Get a profile by name. This is mainly for use by the -P
  55.      * commandline flag.
  56.      *
  57.      * @param aName The profile name to find.
  58.      */
  59.   /* nsIToolkitProfile getProfileByName (in AUTF8String aName); */
  60.   NS_IMETHOD GetProfileByName(const nsACString & aName, nsIToolkitProfile **_retval) = 0;
  61.  
  62.   /**
  63.      * Lock an arbitrary path as a profile. If the path does not exist, it
  64.      * will be created and the defaults copied from the application directory.
  65.      */
  66.   /* nsIProfileLock lockProfilePath (in nsILocalFile aDirectory, in nsILocalFile aTempDirectory); */
  67.   NS_IMETHOD LockProfilePath(nsILocalFile *aDirectory, nsILocalFile *aTempDirectory, nsIProfileLock **_retval) = 0;
  68.  
  69.   /**
  70.      * Create a new profile.
  71.      * 
  72.      * @param aRootDir
  73.      *        The profile directory. May be null, in which case a suitable
  74.      *        default will be chosen based on the profile name.
  75.      * @param aTempDir
  76.      *        The profile temporary directory. May be null, in which case a
  77.      *        suitable default will be chosen based either on the profile name
  78.      *        if aRootDir is null or aRootDir itself.
  79.      * @param aName
  80.      *        The profile name.
  81.      */
  82.   /* nsIToolkitProfile createProfile (in nsILocalFile aRootDir, in nsILocalFile aTempDir, in AUTF8String aName); */
  83.   NS_IMETHOD CreateProfile(nsILocalFile *aRootDir, nsILocalFile *aTempDir, const nsACString & aName, nsIToolkitProfile **_retval) = 0;
  84.  
  85.   /**
  86.      * Returns the number of profiles.
  87.      * @return 0, 1, or 2. More than 2 profiles will always return 2.
  88.      */
  89.   /* readonly attribute unsigned long profileCount; */
  90.   NS_IMETHOD GetProfileCount(PRUint32 *aProfileCount) = 0;
  91.  
  92.   /**
  93.      * Flush the profiles list file.
  94.      */
  95.   /* void flush (); */
  96.   NS_IMETHOD Flush(void) = 0;
  97.  
  98. };
  99.  
  100. /* Use this macro when declaring classes that implement this interface. */
  101. #define NS_DECL_NSITOOLKITPROFILESERVICE \
  102.   NS_IMETHOD GetStartWithLastProfile(PRBool *aStartWithLastProfile); \
  103.   NS_IMETHOD SetStartWithLastProfile(PRBool aStartWithLastProfile); \
  104.   NS_IMETHOD GetStartOffline(PRBool *aStartOffline); \
  105.   NS_IMETHOD SetStartOffline(PRBool aStartOffline); \
  106.   NS_IMETHOD GetProfiles(nsISimpleEnumerator * *aProfiles); \
  107.   NS_IMETHOD GetSelectedProfile(nsIToolkitProfile * *aSelectedProfile); \
  108.   NS_IMETHOD SetSelectedProfile(nsIToolkitProfile * aSelectedProfile); \
  109.   NS_IMETHOD GetProfileByName(const nsACString & aName, nsIToolkitProfile **_retval); \
  110.   NS_IMETHOD LockProfilePath(nsILocalFile *aDirectory, nsILocalFile *aTempDirectory, nsIProfileLock **_retval); \
  111.   NS_IMETHOD CreateProfile(nsILocalFile *aRootDir, nsILocalFile *aTempDir, const nsACString & aName, nsIToolkitProfile **_retval); \
  112.   NS_IMETHOD GetProfileCount(PRUint32 *aProfileCount); \
  113.   NS_IMETHOD Flush(void); 
  114.  
  115. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  116. #define NS_FORWARD_NSITOOLKITPROFILESERVICE(_to) \
  117.   NS_IMETHOD GetStartWithLastProfile(PRBool *aStartWithLastProfile) { return _to GetStartWithLastProfile(aStartWithLastProfile); } \
  118.   NS_IMETHOD SetStartWithLastProfile(PRBool aStartWithLastProfile) { return _to SetStartWithLastProfile(aStartWithLastProfile); } \
  119.   NS_IMETHOD GetStartOffline(PRBool *aStartOffline) { return _to GetStartOffline(aStartOffline); } \
  120.   NS_IMETHOD SetStartOffline(PRBool aStartOffline) { return _to SetStartOffline(aStartOffline); } \
  121.   NS_IMETHOD GetProfiles(nsISimpleEnumerator * *aProfiles) { return _to GetProfiles(aProfiles); } \
  122.   NS_IMETHOD GetSelectedProfile(nsIToolkitProfile * *aSelectedProfile) { return _to GetSelectedProfile(aSelectedProfile); } \
  123.   NS_IMETHOD SetSelectedProfile(nsIToolkitProfile * aSelectedProfile) { return _to SetSelectedProfile(aSelectedProfile); } \
  124.   NS_IMETHOD GetProfileByName(const nsACString & aName, nsIToolkitProfile **_retval) { return _to GetProfileByName(aName, _retval); } \
  125.   NS_IMETHOD LockProfilePath(nsILocalFile *aDirectory, nsILocalFile *aTempDirectory, nsIProfileLock **_retval) { return _to LockProfilePath(aDirectory, aTempDirectory, _retval); } \
  126.   NS_IMETHOD CreateProfile(nsILocalFile *aRootDir, nsILocalFile *aTempDir, const nsACString & aName, nsIToolkitProfile **_retval) { return _to CreateProfile(aRootDir, aTempDir, aName, _retval); } \
  127.   NS_IMETHOD GetProfileCount(PRUint32 *aProfileCount) { return _to GetProfileCount(aProfileCount); } \
  128.   NS_IMETHOD Flush(void) { return _to Flush(); } 
  129.  
  130. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  131. #define NS_FORWARD_SAFE_NSITOOLKITPROFILESERVICE(_to) \
  132.   NS_IMETHOD GetStartWithLastProfile(PRBool *aStartWithLastProfile) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetStartWithLastProfile(aStartWithLastProfile); } \
  133.   NS_IMETHOD SetStartWithLastProfile(PRBool aStartWithLastProfile) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetStartWithLastProfile(aStartWithLastProfile); } \
  134.   NS_IMETHOD GetStartOffline(PRBool *aStartOffline) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetStartOffline(aStartOffline); } \
  135.   NS_IMETHOD SetStartOffline(PRBool aStartOffline) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetStartOffline(aStartOffline); } \
  136.   NS_IMETHOD GetProfiles(nsISimpleEnumerator * *aProfiles) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetProfiles(aProfiles); } \
  137.   NS_IMETHOD GetSelectedProfile(nsIToolkitProfile * *aSelectedProfile) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSelectedProfile(aSelectedProfile); } \
  138.   NS_IMETHOD SetSelectedProfile(nsIToolkitProfile * aSelectedProfile) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetSelectedProfile(aSelectedProfile); } \
  139.   NS_IMETHOD GetProfileByName(const nsACString & aName, nsIToolkitProfile **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetProfileByName(aName, _retval); } \
  140.   NS_IMETHOD LockProfilePath(nsILocalFile *aDirectory, nsILocalFile *aTempDirectory, nsIProfileLock **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->LockProfilePath(aDirectory, aTempDirectory, _retval); } \
  141.   NS_IMETHOD CreateProfile(nsILocalFile *aRootDir, nsILocalFile *aTempDir, const nsACString & aName, nsIToolkitProfile **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateProfile(aRootDir, aTempDir, aName, _retval); } \
  142.   NS_IMETHOD GetProfileCount(PRUint32 *aProfileCount) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetProfileCount(aProfileCount); } \
  143.   NS_IMETHOD Flush(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Flush(); } 
  144.  
  145. #if 0
  146. /* Use the code below as a template for the implementation class for this interface. */
  147.  
  148. /* Header file */
  149. class nsToolkitProfileService : public nsIToolkitProfileService
  150. {
  151. public:
  152.   NS_DECL_ISUPPORTS
  153.   NS_DECL_NSITOOLKITPROFILESERVICE
  154.  
  155.   nsToolkitProfileService();
  156.  
  157. private:
  158.   ~nsToolkitProfileService();
  159.  
  160. protected:
  161.   /* additional members */
  162. };
  163.  
  164. /* Implementation file */
  165. NS_IMPL_ISUPPORTS1(nsToolkitProfileService, nsIToolkitProfileService)
  166.  
  167. nsToolkitProfileService::nsToolkitProfileService()
  168. {
  169.   /* member initializers and constructor code */
  170. }
  171.  
  172. nsToolkitProfileService::~nsToolkitProfileService()
  173. {
  174.   /* destructor code */
  175. }
  176.  
  177. /* attribute boolean startWithLastProfile; */
  178. NS_IMETHODIMP nsToolkitProfileService::GetStartWithLastProfile(PRBool *aStartWithLastProfile)
  179. {
  180.     return NS_ERROR_NOT_IMPLEMENTED;
  181. }
  182. NS_IMETHODIMP nsToolkitProfileService::SetStartWithLastProfile(PRBool aStartWithLastProfile)
  183. {
  184.     return NS_ERROR_NOT_IMPLEMENTED;
  185. }
  186.  
  187. /* attribute boolean startOffline; */
  188. NS_IMETHODIMP nsToolkitProfileService::GetStartOffline(PRBool *aStartOffline)
  189. {
  190.     return NS_ERROR_NOT_IMPLEMENTED;
  191. }
  192. NS_IMETHODIMP nsToolkitProfileService::SetStartOffline(PRBool aStartOffline)
  193. {
  194.     return NS_ERROR_NOT_IMPLEMENTED;
  195. }
  196.  
  197. /* readonly attribute nsISimpleEnumerator profiles; */
  198. NS_IMETHODIMP nsToolkitProfileService::GetProfiles(nsISimpleEnumerator * *aProfiles)
  199. {
  200.     return NS_ERROR_NOT_IMPLEMENTED;
  201. }
  202.  
  203. /* attribute nsIToolkitProfile selectedProfile; */
  204. NS_IMETHODIMP nsToolkitProfileService::GetSelectedProfile(nsIToolkitProfile * *aSelectedProfile)
  205. {
  206.     return NS_ERROR_NOT_IMPLEMENTED;
  207. }
  208. NS_IMETHODIMP nsToolkitProfileService::SetSelectedProfile(nsIToolkitProfile * aSelectedProfile)
  209. {
  210.     return NS_ERROR_NOT_IMPLEMENTED;
  211. }
  212.  
  213. /* nsIToolkitProfile getProfileByName (in AUTF8String aName); */
  214. NS_IMETHODIMP nsToolkitProfileService::GetProfileByName(const nsACString & aName, nsIToolkitProfile **_retval)
  215. {
  216.     return NS_ERROR_NOT_IMPLEMENTED;
  217. }
  218.  
  219. /* nsIProfileLock lockProfilePath (in nsILocalFile aDirectory, in nsILocalFile aTempDirectory); */
  220. NS_IMETHODIMP nsToolkitProfileService::LockProfilePath(nsILocalFile *aDirectory, nsILocalFile *aTempDirectory, nsIProfileLock **_retval)
  221. {
  222.     return NS_ERROR_NOT_IMPLEMENTED;
  223. }
  224.  
  225. /* nsIToolkitProfile createProfile (in nsILocalFile aRootDir, in nsILocalFile aTempDir, in AUTF8String aName); */
  226. NS_IMETHODIMP nsToolkitProfileService::CreateProfile(nsILocalFile *aRootDir, nsILocalFile *aTempDir, const nsACString & aName, nsIToolkitProfile **_retval)
  227. {
  228.     return NS_ERROR_NOT_IMPLEMENTED;
  229. }
  230.  
  231. /* readonly attribute unsigned long profileCount; */
  232. NS_IMETHODIMP nsToolkitProfileService::GetProfileCount(PRUint32 *aProfileCount)
  233. {
  234.     return NS_ERROR_NOT_IMPLEMENTED;
  235. }
  236.  
  237. /* void flush (); */
  238. NS_IMETHODIMP nsToolkitProfileService::Flush()
  239. {
  240.     return NS_ERROR_NOT_IMPLEMENTED;
  241. }
  242.  
  243. /* End of implementation class template. */
  244. #endif
  245.  
  246. #define NS_PROFILESERVICE_CONTRACTID "@mozilla.org/toolkit/profile-service;1"
  247.  
  248. #endif /* __gen_nsIToolkitProfileService_h__ */
  249.